home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / comm / net / drexxmail.lha / elmeditor.rexx < prev    next >
OS/2 REXX Batch file  |  1994-09-30  |  982b  |  43 lines

  1. /* Editor.rexx - This script intercepts the temporary filename of anything  */
  2. /* that GRn/AmigaElm is editing - so we can send mail from them "directly"  */
  3. /* version 3.00 - 9-16-94, by Rick Taylor charlet@eng.clemson.edu           */
  4.  
  5. /* New for v3.00 - A proc reads editor from ENV:DRMEDITOR                   */
  6.  
  7. /* ELM's */
  8.  
  9. options results
  10. TFileName = ARG(1)
  11. address command
  12.  
  13. /* Store this puppy for later */
  14.  
  15. call open .tfn,'t:elmrexxsendmail.name',write
  16. call writeln .tfn,TFileName
  17. call close .tfn
  18.  
  19. /* Now start the editor */
  20.  
  21. call open .dae,'t:elmrexxsendmail.cmd',write
  22. call writeln .dae,envar('DRMEDITOR') TFileName
  23. call close .dae
  24.  
  25. 'execute t:elmrexxsendmail.cmd'
  26.  
  27. /* Now we hand control back to the caller... */
  28.  
  29. exit
  30.  
  31. envar: procedure
  32.      arg evname
  33.      epath = "ENV:"||evname
  34.      evalue = ""
  35.      if exists(epath) then do
  36.           call open .envar,epath,read
  37.           evalue = readln(.envar)
  38.           call close .envar
  39.           end
  40.      return evalue
  41.       
  42.  
  43.